package com.lannuokeji.biz.items.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.lannuokeji.biz.items.entity.Device;

/**
 * <p>
 * 设备信息表 Mapper 接口
 * </p>
 *
 * @author lannuoTeck
 * @since 2018-03-19
 */
public interface DeviceMapper extends BaseMapper<Device> {

//	List<Device> page(Pagination page, @Param("name") String name, @Param("status") Integer status);

	@Update("update g_items set status = 2 where id=#{id}")
	boolean del(@Param("id") Integer id);

	Device getInfo(@Param("id") Integer id);

	@Update("update g_items set roleids = #{roleids} where id=#{id}")
	Integer updateUse(@Param("id") Integer id, @Param("roleids") String roleids);

	List<Device> page(@Param("page") Page<Device> page, @Param("entity") Device entity);
}
